<style lang="scss">
  .hotel{
    &-list{

    }
    &-item{
      width: 710rpx;
      margin: 0 20rpx 20rpx;
      border-radius: 6px;
      overflow: hidden;
      .thumb{
        width: 710rpx;
        height: 355rpx;
      }

      .price-box{
        padding-top: 0 !important;
      }
    }
  }

  .new-ul{
    padding: 20rpx;
    .new-li{
      width: 100%;
      padding: 8px 0;
      justify-content: space-between;
      .l{
        flex: 1;
        .title{
          color: #222222;
        }
        .create_at{
          color: #06A1FB;
        }
      }
      .r{
        width: 220rpx;
        .thumb{
          width: 200rpx;
          height: 134rpx;
          margin: 0 auto;
          border-radius: 5%;
        }
      }

    }
  }

</style>
<template>
<div class="page-wrap">
  <view class="fun-container new-ul bg-white">

    <navigator class="fun-container-item new-li flex font14" :url="'/pages/info/info?id='+item.id" v-for="(item,idx) in lists">
      <view class="l">
        <view class="title m-b-8 fz-16">{{item.title}}</view>
        <view class="create_at fz-12">{{item.create_at}}</view>
      </view>
      <view class="r">
        <image class="thumb" :src="item.thumb" mode="scaleToFill"   />
      </view>
    </navigator>

  </view>
</div>

</template>

<script>

import { pageMixin } from '@/mixins'
import Storage from '@/common/Storage'
import { Exception } from '@/common/Exception'
import { info } from '@/api'

export default {
  mixins: [pageMixin],
  data () {
    return {
      city_id:'',
      imgUrls: [
        'https://images.unsplash.com/photo-1551334787-21e6bd3ab135?w=640',
        'https://images.unsplash.com/photo-1551214012-84f95e060dee?w=640',
        'https://images.unsplash.com/photo-1551446591-142875a901a1?w=640'
      ],
      indicatorDots: false,
      autoplay: false,
      interval: 5000,
      duration: 1000,
      floorstatus: false,
      lists: [],
      life_data: {
        select_type_id: 1,
        types: [],
        page: 1,
        isFinish: false,
        list: [
          // {
          //   title: '测试课程',
          //   logo: 'https://qingclouds-server.oss-cn-shanghai.aliyuncs.com/upload/logo.png',
          //   desc: '描述啊',
          //   type: 'goods',
          //   price: 2323,
          //   id: 2
          // }
        ]

      }
    }
  },
  methods: {
    async _init_func () {
      var params = {
        action: 'notify'
      }
      if (this.city_id) {
        params.city_id = this.city_id
      }
      this.lists = await info(params).then(res => res.data).catch(err => Exception.handle(err))
    }
  },
  onShareAppMessage () {
    // let userInfo = wx.getStorageSync('userInfo'),path = '/pages/map/deatil?id='+this.map.id;
    //
    // //加入分享标识
    // if(userInfo && userInfo.id){
    //   path = path + '&from_mid=' + userInfo.id
    // }
    //
    return {
      title: '青云旅游资讯'
      // imageUrl: this.map.thumb || wx.state.logo,
      // path: path
    }
  },
  onLoad (options) {
    this.city_id = options.city_id
    this._init_func()
  }
}

</script>
